// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
//
// ███╗   ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗  ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║   ██║   ██║   ██║██║     █████╗
// ██║╚██╗██║██║   ██║   ██║   ██║██║     ██╔══╝
// ██║ ╚████║╚██████╔╝   ██║   ██║╚██████╗███████╗
// ╚═╝  ╚═══╝ ╚═════╝    ╚═╝   ╚═╝ ╚═════╝╚══════╝
// ------------------------------------------------
//
// This file is automatically generated.
// Please do not edit these files manually.
//
// ------------------------------------------------

#nullable restore

using System;
using System.Linq;
using Elastic.Clients.Elasticsearch.Serialization;

namespace Elastic.Clients.Elasticsearch.Analysis;

[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Analysis.Json.ICharFilterConverter))]
public partial interface ICharFilter
{
	public string Type { get; }
}

public readonly partial struct CharFilterFactory
{
	public Elastic.Clients.Elasticsearch.Analysis.ICharFilter HtmlStrip(Elastic.Clients.Elasticsearch.Analysis.HtmlStripCharFilter value)
	{
		return value;
	}

	public Elastic.Clients.Elasticsearch.Analysis.ICharFilter HtmlStrip()
	{
		return Elastic.Clients.Elasticsearch.Analysis.HtmlStripCharFilterDescriptor.Build(null);
	}

	public Elastic.Clients.Elasticsearch.Analysis.ICharFilter HtmlStrip(System.Action<Elastic.Clients.Elasticsearch.Analysis.HtmlStripCharFilterDescriptor>? action)
	{
		return Elastic.Clients.Elasticsearch.Analysis.HtmlStripCharFilterDescriptor.Build(action);
	}

	public Elastic.Clients.Elasticsearch.Analysis.ICharFilter IcuNormalization(Elastic.Clients.Elasticsearch.Analysis.IcuNormalizationCharFilter value)
	{
		return value;
	}

	public Elastic.Clients.Elasticsearch.Analysis.ICharFilter IcuNormalization()
	{
		return Elastic.Clients.Elasticsearch.Analysis.IcuNormalizationCharFilterDescriptor.Build(null);
	}

	public Elastic.Clients.Elasticsearch.Analysis.ICharFilter IcuNormalization(System.Action<Elastic.Clients.Elasticsearch.Analysis.IcuNormalizationCharFilterDescriptor>? action)
	{
		return Elastic.Clients.Elasticsearch.Analysis.IcuNormalizationCharFilterDescriptor.Build(action);
	}

	public Elastic.Clients.Elasticsearch.Analysis.ICharFilter KuromojiIterationMark(Elastic.Clients.Elasticsearch.Analysis.KuromojiIterationMarkCharFilter value)
	{
		return value;
	}

	public Elastic.Clients.Elasticsearch.Analysis.ICharFilter KuromojiIterationMark(System.Action<Elastic.Clients.Elasticsearch.Analysis.KuromojiIterationMarkCharFilterDescriptor> action)
	{
		return Elastic.Clients.Elasticsearch.Analysis.KuromojiIterationMarkCharFilterDescriptor.Build(action);
	}

	public Elastic.Clients.Elasticsearch.Analysis.ICharFilter Mapping(Elastic.Clients.Elasticsearch.Analysis.MappingCharFilter value)
	{
		return value;
	}

	public Elastic.Clients.Elasticsearch.Analysis.ICharFilter Mapping()
	{
		return Elastic.Clients.Elasticsearch.Analysis.MappingCharFilterDescriptor.Build(null);
	}

	public Elastic.Clients.Elasticsearch.Analysis.ICharFilter Mapping(System.Action<Elastic.Clients.Elasticsearch.Analysis.MappingCharFilterDescriptor>? action)
	{
		return Elastic.Clients.Elasticsearch.Analysis.MappingCharFilterDescriptor.Build(action);
	}

	public Elastic.Clients.Elasticsearch.Analysis.ICharFilter PatternReplace(Elastic.Clients.Elasticsearch.Analysis.PatternReplaceCharFilter value)
	{
		return value;
	}

	public Elastic.Clients.Elasticsearch.Analysis.ICharFilter PatternReplace(System.Action<Elastic.Clients.Elasticsearch.Analysis.PatternReplaceCharFilterDescriptor> action)
	{
		return Elastic.Clients.Elasticsearch.Analysis.PatternReplaceCharFilterDescriptor.Build(action);
	}

	[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
	internal static Elastic.Clients.Elasticsearch.Analysis.ICharFilter Build(System.Func<Elastic.Clients.Elasticsearch.Analysis.CharFilterFactory, Elastic.Clients.Elasticsearch.Analysis.ICharFilter> action)
	{
		var builder = new Elastic.Clients.Elasticsearch.Analysis.CharFilterFactory();
		return action.Invoke(builder);
	}
}